/*
 * @Author: zhang·xiao
 * @Date: 2022-11-07 22:02:56
 * @LastEditors: zhang·xiao
 * @LastEditTime: 2022-11-30 22:27:26
 * @Description: 描述文件功能
 */
// 引入 @internal/page-components 解决组件内部注册报错
import pageComponents from '@internal/page-components'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import XFSMUI from '../../packages/element-ui/index'
import XFSMBUI from '../../packages/business-ui/index'
import elIcons from '../../examples/assets/json/el-icon.json'
import dlIcons from '../../examples/assets/json/dl-icon.json'
import '../../packages/element-ui/styles/src/index.scss'
import { data6 } from './micoData'
export default async ({ Vue, options, router, siteData, isServer }) => {
  if (!isServer) {
    for (const [name, component] of Object.entries(pageComponents)) {
      Vue.component(name, component)
    }
    await XFSMUI.updateUITheme({
      primaryColor: '#FFAA00',
      primarySecondColor: '#231909',
      oldTheme: window.oldTheme || '#409EFF'
    })
    Vue.use(ElementUI);
    Vue.use(XFSMUI);
    Vue.use(XFSMBUI);
    Vue.prototype.$elIcons = elIcons
    Vue.prototype.$dlIcons = dlIcons
    window.oldTheme = '#FFAA00'
    window.primarySecond = '#231909'
    window.$updateTheme = XFSMUI.updateUITheme
    // Vue.prototype.$updateTheme = XFSMUI.updateTheme
  }
};
